Skip to content

Fix bug where a buffer construction is attempted in env without it#209

Merged
skeet70 merged 7 commits into
mainfrom
fix-missing-Buffer-browser-bug
Apr 25, 2026
Merged

Fix bug where a buffer construction is attempted in env without it#209
skeet70 merged 7 commits into
mainfrom
fix-missing-Buffer-browser-bug

Conversation

@skeet70

@skeet70 skeet70 commented Apr 23, 2026

Copy link
Copy Markdown
Member

like a web browser that didn't have a system to polyfill buffer in when encountered during bundling.

I ran this new integration test against staging where it fails with the expected error about Buffer not existing (the one I ran into when doing an example Todo app). It also succeeds locally against the dev cluster + integration server proxying the fixed frame.

The fix is in src/frame/protobuf/index.ts, everything else is getting the integration tests running currently, trying to capture how I ran them.

There's also a fix in src/frame/index.ts for streaming blocking on its initial write of IV/Header.

integration/README.md covers how running integration tests works now. They generate localhost self-signed certs automatically (so no more re-downloading and extracting dev certs every time you come back to this repo), and a canned assertion key and project for staging are encrypted in integration/projects. The tests run against staging for auth/assertion/project+segment, but through a proxy that replaces the frame/worker with the local ones. So by default you're testing all your local code but without needing to run the IC-ID stack or set up an admin project.

You still can run the local stack, set up a project, or run the tests against specific version frames in stage/prod if you want, but the default is now the easy and fully canned pattern.

like a web browser that didn't have a system to polyfill buffer in when encountered during bundling.
skeet70 added 6 commits April 23, 2026 15:10
also add integration tests to CI (this is likely to need some iteration)
so they work in CI where CPU is way more variable. Required adding some
things to wait for in cases that didn't already create an element at the
right time in the process.
@skeet70 skeet70 merged commit f792dd0 into main Apr 25, 2026
2 checks passed
@skeet70 skeet70 deleted the fix-missing-Buffer-browser-bug branch April 25, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants